Running Pinta on FreeBSD – A C# (Mono) Image Editor

I wanted to continue with the C# (Mono) on FreeBSD theme this week. The next C# (Mono) post for FreeBSD is simply running a .C# (Mono) app on FreeBSD.

My first thought was this, “I wonder if there is a mono version of Paint.NET?”. Paint.NET is my favorite image editor for Windows.

After a quick search, I found the Pinta project, which is a Mono clone of Paint.NET.

Installing Pinta on FreeBSD

So anyway, the steps for running on FreeBSD are quite simple.  This is a preview of my next FreeBSD Friday post, as I will continue the mono them to promote you app.

  1. Follow this post to get mono on FreeBSD.
    http://rhyous.com/2010/12/10/c-mono-on-freebsd/
  2. Download the Pinta tarball: http://pinta-project.com/download
    $ fetch http://github.com/downloads/jpobst/Pinta/pinta-0.5.tar.gz
  3. Extract it:
    $ tar -xzf pinta-0.5.tar.gz
  4. Change to the directory:
    $ cd pinta-0.5
  5. Run configure.
    $ ./configure
  6. This failed the first time I ran it because I didn’t have a .tmp directory in my home directory. So I create one.
    $ mkdir ~/.tmp
  7. Run make.
    $ make
  8. Then as root or with sudo, run make install.
    # make install
  9. Make the shell rehash the commands in PATH.
    $ rehash
    – or depending on your shell –
    $ hash -r
  10. Now just run pinta.
    $pinta

    Warning! I had to remove those annoying ^M characters from the /usr/local/bin/pinta file to get it to run. Otherwise, I got this error:
    : No such file or directory

  11. I use KDE so I was able to add a menu item for pinta easily.  An installed logo would be nice. I found one in the source at this path: pinta-0.5/xdg/96×96/pinta.png.  I copied it to /usr/local/lib/pinta.

More information

Pinta installs the following files

/usr/local/bin/pinta
/usr/local/lib/pinta/

/usr/local/lib/pinta/Pinta.Core.dll
/usr/local/lib/pinta/Pinta.Effects.dll
/usr/local/lib/pinta/Pinta.Gui.Widgets.dll
/usr/local/lib/pinta/Pinta.Resources.dll
/usr/local/lib/pinta/Pinta.Tools.dll
/usr/local/lib/pinta/Pinta.exe

I added manually added the log so I had something to put in the KDE menu.
/usr/local/lib/pinta/pinta.png

The first file, /usr/local/bin/pinta, is a shell script that runs this:
#!/bin/sh
exec /usr/local/bin/mono /usr/local/lib/pinta/Pinta.exe “$@”

The other files are the application. It is a little weird to see .exe and .dll files on FreeBSD, but I’ll get over it.

Leave a Reply